﻿<UserControl x:Class="DotNetSimaticDatabaseProtokollerConfigurationTool.Windows.ViewStorrages"
             xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
             xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
             xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
             xmlns:Datasets="clr-namespace:DotNetSimaticDatabaseProtokollerLibrary.SettingsClasses.Datasets;assembly=JFK-ProtokollerLibrary"
             xmlns:DotNetSimaticDatabaseProtokollerLibrary="clr-namespace:DotNetSimaticDatabaseProtokollerLibrary;assembly=JFK-ProtokollerLibrary"
             xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
             xmlns:System="clr-namespace:System;assembly=mscorlib"
             xmlns:Converters="clr-namespace:JFKCommonLibrary.WPF.Converters;assembly=JFKCommonLibrary" d:DesignHeight="426"
             d:DesignWidth="765"
             mc:Ignorable="d">

    <UserControl.Resources>
        <Converters:NullToFalseConverter x:Key="myNullToFalseConverter" />

    </UserControl.Resources>

    <Grid>
        <DataGrid Name="grdDatasetFields"
                  Margin="12,112,12,62"
                  AutoGenerateColumns="True"
                  CanUserAddRows="False"
                  CanUserDeleteRows="False"
                  CanUserReorderColumns="True"
                  CanUserResizeRows="False"
                  CanUserSortColumns="True"
                  IsReadOnly="True"
                  MouseDoubleClick="grdDatasetFields_MouseDoubleClick"
                  SelectionUnit="Cell" />
        <Label Width="55"
               Height="26"
               Margin="12,12,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Center"
               Content="Dataset"
               Padding="0" />
        <ComboBox Name="cmbStorage"
                  Width="209"
                  Height="26"
                  Margin="60,12,0,0"
                  HorizontalAlignment="Left"
                  VerticalAlignment="Top"
                  VerticalContentAlignment="Center"
                  ItemsSource="{Binding Datasets,
                                        Source={x:Static DotNetSimaticDatabaseProtokollerLibrary:ProtokollerConfiguration.ActualConfigInstance}}"
                  SelectionChanged="cmbStorage_SelectionChanged"
                  Unloaded="cmbStorage_Unloaded">
            <ComboBox.ItemTemplate>
                <DataTemplate>
                    <TextBlock Text="{Binding Name}" />
                </DataTemplate>
            </ComboBox.ItemTemplate>
        </ComboBox>
        <Button Name="cmdBeginn"
                Width="62"
                Height="30"
                Margin="12,76,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="cmdBeginn_Click"
                Content="&lt;&lt;" />
        <Button Name="cmdEnd"
                Width="62"
                Height="30"
                Margin="216,76,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="cmdEnd_Click"
                Content="&gt;&gt;" />
        <Button Name="cmdFwd"
                Width="62"
                Height="30"
                Margin="148,76,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="cmdFwd_Click"
                Content="&gt;" />
        <Button Name="cmdBack"
                Width="62"
                Height="30"
                Margin="80,76,0,0"
                HorizontalAlignment="Left"
                VerticalAlignment="Top"
                Click="cmdBack_Click"
                Content="&lt;" />
        <TextBox Name="txtSQL"
                 Height="26"
                 Margin="313,12,109,0"
                 VerticalAlignment="Top"
                 KeyDown="txtSQL_KeyDown" />
        <Label Width="23"
               Height="26"
               Margin="284,10,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Center"
               Content="SQL"
               Padding="0" />
        <Button Name="cmdSQL"
                Width="91"
                Height="26"
                Margin="0,12,12,0"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Click="cmdSQL_Click"
                Content="Execute"
                IsEnabled="False" />
        <Label Width="65"
               Height="26"
               Margin="313,80,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Center"
               Content="Datasets"
               Padding="0" />
        <TextBox Name="txtFromDataset"
                 Width="93"
                 Height="26"
                 Margin="366,80,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 KeyDown="txtFromDataset_KeyDown"
                 Text="0"
                 TextAlignment="Center"
                 TextChanged="txtFromDataset_TextChanged" />
        <Label Width="11"
               Height="26"
               Margin="465,78,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Center"
               Content="-"
               FontSize="16"
               FontWeight="ExtraBold"
               Padding="0" />
        <Label Name="lblDataCount"
               Width="91"
               Height="26"
               Margin="0,80,12,0"
               HorizontalAlignment="Right"
               VerticalAlignment="Top"
               HorizontalContentAlignment="Center"
               VerticalContentAlignment="Center"
               BorderBrush="Black"
               BorderThickness="1"
               Content=""
               Padding="0" />
        <TextBox Width="209"
                 Height="14"
                 Margin="60,38,0,0"
                 HorizontalAlignment="Left"
                 VerticalAlignment="Top"
                 FontSize="8"
                 IsReadOnly="True"
                 Padding="0"
                 Text="{Binding ElementName=cmbStorage,
                                Path=SelectedItem.Storage,
                                StringFormat=$}"
                 TextAlignment="Center" />
        <Label Name="lblToDataset"
               Width="103"
               Height="26"
               Margin="479,80,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               HorizontalContentAlignment="Center"
               VerticalContentAlignment="Center"
               BorderBrush="Black"
               BorderThickness="1"
               Content=""
               Padding="0" />
        <Label Name="lblError"
               Height="44"
               Margin="47,0,12,12"
               VerticalAlignment="Bottom"
               HorizontalContentAlignment="Center"
               VerticalContentAlignment="Center"
               BorderBrush="Black"
               BorderThickness="1"
               Padding="0" />
        <Label Width="55"
               Height="18"
               Margin="12,0,0,25"
               HorizontalAlignment="Left"
               VerticalAlignment="Bottom"
               VerticalContentAlignment="Center"
               Content="Error"
               Padding="0" />
        <TextBox Name="txtSearch"
                 Height="26"
                 Margin="343,39,109,0"
                 VerticalAlignment="Top" />
        <Button Name="cmdSearch"
                Width="91"
                Height="26"
                Margin="0,39,12,0"
                HorizontalAlignment="Right"
                VerticalAlignment="Top"
                Click="cmdSearch_Click"
                Content="Suche"
                IsEnabled="False" />
        <Label Width="64"
               Height="26"
               Margin="284,37,0,0"
               HorizontalAlignment="Left"
               VerticalAlignment="Top"
               VerticalContentAlignment="Center"
               Content="Textsuche"
               Padding="0" />
    </Grid>
</UserControl>
